SDEF
// SINED SECTION
//
/*SINED Monster_Mortician_Normal (1 .5 0) (0 0 0) (0 0 0)
Mortician with a magnum
*/

path models/mortician

// Model Commands
scale 1.5

//Skin
normal	mort_05a.tga
//mort_05b.tga
//mort_05c.tga
//mort_05d.tga
//mort_05e.tga
damage	mort_damage_05a.tga
//mort_damage_05b.tga
//mort_damage_05c.tga
//mort_damage_05d.tga
//mort_damage_05e.tga

//Base model
mort_base.sbm

// Normal Animations
idle1			idlea.sam
twitch1		idleb.sam
twitch2		idlec.sam
fire			shoot.sam
//fire2			shoot2.sam
run			walk.sam
walk			walk.sam
melee			step_punch.sam

// Pain Location Based Animations
pain1        	pain_normal.sam
pain_back		pain_back.sam
pain_chest		pain_front.sam
pain_head		pain_head.sam
pain_left_arm	pain_left_arm.sam
pain_left_leg	pain_left_leg.sam
pain_right_arm	pain_right_arm.sam
pain_right_leg	pain_right_leg.sam

// Death Location Based Animations
death1       	deatha.sam
death2       	deathb.sam
death3		deathc.sam
death4		deathd.sam
death5		deathe.sam

// Crouching Pain Location Based Animations

// Crouching Death Location Based Animations

// Optional Animations
//melee_aim		embalm_open.sam
//melee_a		embalm_extend.sam
//melee_hit		embalm_extend.sam
//melee_miss		embalm_extend.sam
//melee_b		embalm_withdraw.sam
//melee_c		embalm_withdraw.sam
//melee_unaim		embalm_close.sam
strafe_left		strafe_left.sam
strafe_right	strafe_right.sam

// Leaping Around Animations
jump_forward		jump_forward.sam
jump_left			jump_left.sam
jump_right			jump_right.sam
jump_back			jump_up_back.sam

jump_forward_inair	jump_forward_post.sam
jump_left_inair		jump_left_post.sam
jump_right_inair		jump_right_post.sam
jump_back_inair		jump_back_post.sam

//land			land_forward.sam
land_forward		land_forward.sam
land_left			land_left.sam
land_right			land_right.sam
land_back			land_back.sam
//land_left_kick		land_left_kick.sam
//land_right_kick		land_right_kick.sam
land_down			land_up.sam	
//land_still		land_upshort.sam

air_flip			jump_flip.sam	
air_idle			jump_idle.sam
air_shoot			jump_shoot.sam

step_left			strafe_left.sam
step_right			strafe_right.sam

// Scripted Animations
step_punch		step_push.sam
//embalm		dead_guy_start.sam
//embalm_loop		dead_guy_loop.sam
//embalm_finish	dead_guy_end.sam

// Id And Group Definitions
id 10 group head flesh
group head damage 2.0
id 20 group torso_front flesh
group torso_front damage 1.2
id 22 group torso_back flesh
group torso_back damage 1
id 30 group leg_left flesh
group leg_left damage 0.4
id 40 group leg_right flesh
group leg_right damage 0.4
id 50 group arm_left flesh
group arm_left damage 0.7
id 60 group arm_right  flesh
group arm_right damage 1
id 100 group gunhand bone gun -115 60 20 2015attach flesh


//
// INITIALIZATION SECTION
//
!init:

//
// SERVER Initialization Commands
//

// Class Setup
server classname mortician
server setsize "-22 -22 0" "22 22 70"
server crouchsize "-22 -22 0" "22 22 70"
server script global/mortician.scr
server weapon magnum
server health 250
//server health 400
server meleerange 25
server meleedamage 30
server painthreshold 25

server ifskill 0 aim 0.5
server ifskill 1 aim 0.6
server ifskill 2 aim 0.7


// Sound Aliases

// The mortician is a very intelligent mutant, but he doesn't talk.
// We want him to give the impression of a well-trained killer who
// doesn't feel the need to bad-mouth you when he's fighting.  He
// laughs quietly, and grunts when appropriate, and maybe says
// a few words occasionally, but no stupid inhuman roaring or anything.
// Many of the sounds are more body sounds, for example, he has claws so
// he sounds like a dog when walking around, his twitch animations
// invlove scratching his head, and his embalmer makes noise as it 
// extends towards the player and attaches to him.

server aliascache snd_sight1     "monsters/mortician/site1.wav" 1
server aliascache snd_sight2     "monsters/mortician/site2.wav" 1
server aliascache snd_sight3     "monsters/mortician/site3.wav" 1
server aliascache snd_sight4     "monsters/mortician/site4.wav" 1

server aliascache snd_idle1      "monsters/mortician/idle1.wav" 1
server aliascache snd_idle2      "monsters/mortician/idle2.wav" 1
server aliascache snd_idle3      "monsters/mortician/idle3.wav" 1

server aliascache snd_twitch1      "monsters/mortician/idle4.wav" 1
server aliascache snd_twitch2      "monsters/mortician/idle5.wav" 1

server aliascache snd_pursuit1   "monsters/mortician/purs1.wav" 1
server aliascache snd_pursuit2   "monsters/mortician/purs2.wav" 1
//server aliascache snd_pursuit3   "monsters/mortician/purs3.wav" 1
server aliascache snd_pursuit4   "monsters/mortician/purs4.wav" 1

//
// CLIENT Initialization Commands
//

// Sound Aliases
client aliascache	snd_attack1    "monsters/mortician/attack1.wav" 1
client aliascache snd_attack2    "monsters/mortician/attack2.wav" 1
client aliascache snd_attack3    "monsters/mortician/attack3.wav" 1

client aliascache snd_death1     "monsters/mortician/death1.wav" 1
client aliascache snd_death2     "monsters/mortician/death2.wav" 1
client aliascache snd_death3     "monsters/mortician/death3.wav" 1

client aliascache snd_pain1      "monsters/mortician/pain1.wav" 1
client aliascache snd_pain2      "monsters/mortician/pain2.wav" 1
client aliascache snd_pain3      "monsters/mortician/pain3.wav" 1
client aliascache snd_pain4      "monsters/mortician/pain4.wav" 1

client aliascache stepsound1      "monsters/mortician/pain5.wav" 1
client aliascache stepsound2      "monsters/mortician/pain5.wav" 1
client aliascache stepsound3      "monsters/mortician/pain5.wav" 1

client aliascache jump1      	   "monsters/mortician/pain5.wav" 1
client aliascache jump2      	   "monsters/mortician/pain5.wav" 1
client aliascache jump3      	   "monsters/mortician/pain5.wav" 1

// Landsteps are louder footsteps, for when he lands.  I'm not anticipating him
// making any other sound when he lands.
//client aliascache landstep1  	   "monsters/mortician/vulpain4.wav" 1
//client aliascache landstep2  	   "monsters/mortician/vulpain4.wav" 1
//client aliascache landstep3      "monsters/mortician/vulpain4.wav" 1

client aliascache snd_kneefall1  "impact/bodyfall/sml1.wav" 1
client aliascache snd_kneefall2  "impact/bodyfall/sml2.wav" 1
client aliascache snd_partfall1  "impact/bodyfall/med1.wav" 1
client aliascache snd_partfall2  "impact/bodyfall/med2.wav" 1
client aliascache snd_partfall3  "impact/bodyfall/med3.wav" 1
client aliascache snd_bodyfall1  "impact/bodyfall/lrg1.wav" 1
client aliascache snd_bodyfall2  "impact/bodyfall/lrg2.wav" 1

// There is one scripted animation where he hits the player with his gun, so 
// we need a sound for that.  The whoosh one is fine as it is though
client aliascache snd_punch    "weapons/punch/whsh1.wav" 1
client aliascache snd_miss    "weapons/punch/whsh2.wav" 1

// He has a long mechanical tentacle thing in his right arm, which he extends into
// the player to grab him and hurt him with, and this needs sounds for opening,
// extending (short and loopable), attaching to the player, missing the player, 
// striking a wall, retracting either under load or not, and closing again.
//client aliascache embalm_open    	"weapons/punch/whsh1.wav" 1
//client aliascache embalm_extend1    "weapons/punch/whsh1.wav" 1
//client aliascache embalm_extend2    "weapons/punch/whsh1.wav" 1
//client aliascache embalm_attach1    "weapons/punch/whsh1.wav" 1
//client aliascache embalm_attach2    "weapons/punch/whsh1.wav" 1
//client aliascache embalm_miss		"weapons/punch/whsh1.wav" 1
//client aliascache embalm_retract1	"weapons/punch/whsh1.wav" 1
//client aliascache embalm_retract2	"weapons/punch/whsh1.wav" 1
//client aliascache embalm_pull1	"weapons/punch/whsh1.wav" 1
//client aliascache embalm_pull2	"weapons/punch/whsh1.wav" 1
//client aliascache embalm_close	"weapons/punch/whsh1.wav" 1


//
// SHARED initialization commands
//

// Sound Aliases

//
// MAIN SECTION
//
!main:

// Animation tricky manipulation stuff
server air_idle last nextanim air_idle
//server melee_a last nextframe 0
//server melee_hit first setframe 10
//server melee_miss first setframe 10


// Normal Animations
//client walk 2 randomsound footstep 1 2
client walk 2  footstep
//client walk 7 randomsound footstep 1 2
client walk 7  footstep
server walk 7 movementsound

server fire 4 fire
//server fire2 3 fire
server air_shoot 1 fire
server melee 3 melee

//server melee_aim	2  movementsound
//client melee_aim	1  randomsound embalm_open 1 2
//server melee_a	1  melee
//client melee_a	1  randomsound embalm_extend 1 1
//client melee_a	5  randomsound embalm_extend 1 1
//client melee_a	9  randomsound embalm_extend 1 1
//server melee_hit	1  melee
//client melee_hit	1  randomsound embalm_hit 1 1
//server melee_miss	1  melee
//client melee_miss	1  randomsound embalm_miss 1 1
//server melee_b	1  melee
//client melee_b	1  randomsound embalm_pull 1 1
//server melee_c	1  melee
//client melee_c	1  randomsound embalm_rectract 1 1
//server melee_unaim	2  movementsound
//client melee_unaim	1  randomsound embalm_close 1 2


// Pain Location Based Animations
server pain1 painsound
client pain1 first randomsound snd_pain 1 2
server pain_back painsound
client pain_back first randomsound snd_pain 1 2
server pain_chest painsound
client pain_chest first randomsound snd_pain 1 2
server pain_head painsound
client pain_head first randomsound snd_pain 1 2
server pain_left_arm painsound
client pain_left_arm first randomsound snd_pain 1 2
server pain_left_leg painsound
client pain_left_leg first randomsound snd_pain 1 2
server pain_right_arm painsound
client pain_right_arm first randomsound snd_pain 1 2
server pain_right_leg painsound
client pain_right_leg first randomsound snd_pain 1 2


// Death Location Based Animations
server death1 first deathsound
client death1 first randomsound snd_death 1 2
client death1 14 randomsound snd_bodyfall 1 4
client death1 22 randomsound snd_partfall 1 4

server death2 first deathsound
client death2 first randomsound snd_death 1 2
client death2 10 randomsound snd_bodyfall 1 4

server death3 first deathsound
client death3 first randomsound snd_death 1 2
client death3 10 randomsound snd_bodyfall 1 4

server death4 first deathsound
client death4 first randomsound snd_death 1 2
client death4 13 randomsound snd_bodyfall 1 4

server death4 first deathsound
client death4 first randomsound snd_death 1 2
client death4 13 randomsound snd_bodyfall 1 4

server death5 1 deathsound
client death5 1 randomsound snd_death 1 2
client death5 5 randomsound snd_bodyfall 1 4

// Crouching Pain Location Based Animations

// Crouching Death Location Based Animations

// Optional Animations

// Scripted Animations
client step_punch 2 footstep
server step_punch 2 movementsound
client step_punch 7 footstep
server step_punch 7 movementsound
// This also needs a sound for contact perhaps?
